//
//  PhotoView.m
//  AutoHome
//
//  Created by wqh on 15-5-16.
//  Copyright (c) 2015年 Wqh. All rights reserved.
//

#import "PhotoView.h"

@implementation PhotoView


- (void)awakeFromNib {
    self.backgroundColor = [UIColor blackColor];
    self.contentSize = CGSizeMake(kScreenWidth, kScreenHeight);
    self.showsHorizontalScrollIndicator = NO;
    self.showsVerticalScrollIndicator = NO;
    self.bounces = NO;
    self.img = [[UIImageView alloc] initWithFrame:CGRectMake(0, 100, kScreenWidth, kScreenWidth*3/4)];
    [self addSubview:self.img];
    //设置内容最小最大放大比例
    self.minimumZoomScale = 0.5;
    self.maximumZoomScale = 2.0;
    self.delegate = self;
}

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
    return self.img;
}


@end
